package com.example.nacos.cal;

import com.alibaba.excel.annotation.ExcelProperty;

import java.time.LocalDate;
import java.util.Objects;

public class FundData {
    @ExcelProperty("统计日期")
    private LocalDate statDate;
    @ExcelProperty("累计净值")
    private Double cumulativeNetValue;
    @ExcelProperty("产品编码")
    private String fundCode;

    public FundData() {}

    public FundData(LocalDate statDate, Double cumulativeNetValue, String fundCode) {
        this.statDate = statDate;
        this.cumulativeNetValue = cumulativeNetValue;
        this.fundCode = fundCode;
    }

    public LocalDate getStatDate() {
        return statDate;
    }

    public void setStatDate(LocalDate statDate) {
        this.statDate = statDate;
    }

    public Double getCumulativeNetValue() {
        return cumulativeNetValue;
    }

    public void setCumulativeNetValue(Double cumulativeNetValue) {
        this.cumulativeNetValue = cumulativeNetValue;
    }

    public String getFundCode() {
        return fundCode;
    }

    public void setFundCode(String fundCode) {
        this.fundCode = fundCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FundData fundData = (FundData) o;
        return Objects.equals(statDate, fundData.statDate) &&
                Objects.equals(cumulativeNetValue, fundData.cumulativeNetValue) &&
                Objects.equals(fundCode, fundData.fundCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(statDate, cumulativeNetValue, fundCode);
    }

    @Override
    public String toString() {
        return "FundData{" +
                "statDate=" + statDate +
                ", cumulativeNetValue=" + cumulativeNetValue +
                ", fundCode='" + fundCode + '\'' +
                '}';
    }
}
